<!DOCTYPE html>
<html lang="en" class="no-js" xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout" layout:decorator="layout">
<head>
<title>商品管理</title>
 <script th:inline="javascript">
/*<![CDATA[*/

    function add(event,element){
    	event.preventDefault();
    	var re = /^[0-9]+.?[0-9]*$/; 
    		
   		var _id = $(element).attr("href").split("_")[0];
   		var _multiple = $("#multiple"+_id).val();
   		var _credit = $("#credit"+_id).val();
   		var _spid = $(element).attr("href").split("_")[1];
  

   		if(_multiple==''){
   			alert("倍数不能为空");return;
   		}
   		else if(!re.test(_multiple)){
   			alert("请输入正确的倍数");return;
   		}
   		else if(_credit==''){
   			alert("积分不能为空");return;
   		}
   		else if(!re.test(_credit)){
   			alert("请输入正确的积分");return;
   		}
   		BOSS.remoteCall('promotion/creditpromotiongoods/ajaxsave',$('#div_creditpromotiongoods_grid'),{idd:_id,multipled:_multiple,creditd:_credit,spidd:_spid,spaddd:'spadd'});
    }
	
/*]]>*/
</script>
</head>
<body>
<div layout:fragment="content">
	<div class="row">
		<div class="col-md-12">
			<div class="btn-group pull-right">
				<a href="index.html" th:href="@{'/promotion/creditpromotiongoods/index/'+${creditPromotionId}}" id="sample_editable_1_new" class="btn green">返回<i class="fa fa-arrow-circle-o-left"></i></a>
			</div>
		</div>
	</div>
	<div class="row">
		<div class="col-md-12">
			<div class="form">
					<h4 class="form-section">商品信息</h4>
					
					<div class="form-body">
					<div class="col-md-15 col-sm-13">
						<form class="form-inline" th:action="@{'/promotion/creditpromotiongoods/list/'+${creditPromotionId}}"  th:object="${goodsSearch}"  method="post">
							<div class="form-group">
					            <select id="goodsBrandsId" name="goodsBrandsId" style="width:110px;" th:remove="none" class="form-control">
					            	<option value="">所有品牌</option>
					                <option th:each="eachValue : ${brands}" th:field="*{goodsBrandsId}" th:value="${eachValue.id}" th:text="${eachValue.name}"></option>
					            </select>	
					            <input type="hidden" id="hidden_goodsBrandsId" th:value="${goodsBrandsId}" />												
						</div>
							
							<div class="form-group">
					            <select id="goodsCategoryId" name="goodsCategoryId" style="width:110px;" th:remove="none" class="form-control">
					            	<option value="">所有分类</option>
					                <option th:each="eachValue : ${categorys}" th:field="*{goodsCategoryId}" th:value="${eachValue.id}" th:text="${eachValue.name}"></option>
					            </select>
					            <input type="hidden" id="hidden_goodsCategoryId" th:value="${goodsCategoryId}" />														
							</div>
		
							
							<div class="form-group">
							<label class="sr-only" for="keyword">keyword</label>
								<input type="text" name="keyword" style="width:80px;" th:field="*{keyword}" placeholder="关键字"  id="keyword" class="form-control" />
							</div>
	
							
							
							<button type="submit" id="bt_search" name="bt_search" class="btn green">
								<i class="fa  fa-search"></i>
							</button>
						</form>
					</div>
					
					
					</div>
					
			</div>
		</div>
	</div>
</div>	
</body>
</html>
